<%@ Page Language="C#" MasterPageFile="~/MainMaster.master" AutoEventWireup="true"
    CodeFile="myBlog.aspx.cs" Inherits="DashBoard_myBlog" Title="Untitled Page" %>

<%@ Register Src="~/includes/Editor/Editor.ascx" TagName="BlogEditor" TagPrefix="Editor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainTable" runat="Server">

    <script>
        function confirmDelete() {
            var x = confirm("Do you want to DELETE your blog?");
            if (x)
                return true;
            else
                return false;
        }
    </script>

    <br />
    <!---/ Left wrapper -->
    <div style="width: 94%; padding: 3%">
        <div style="background-color: #f4f4f4; width: 94%; padding: 3%">
            <table cellpadding="0" cellspacing="0" border="0" width="100%" style="text-align: justify; line-height: 20px">
                <tr>
                    <td>
                        <asp:Repeater ID="rpMytopics" runat="Server" OnItemCommand="rpMytopics_ItemCommand">
                            <HeaderTemplate>
                                <table cellpadding="2" cellspacing="0">
                                    <tr>
                                        <td>
                                            <strong>List of Topic in which you have panned down</strong></td>
                                    </tr>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <tr>
                                    <td valign="top">
                                        <asp:LinkButton CommandName="Go" CommandArgument='<%#Bind("Id")%>' ID="LinkButton1"
                                            runat="server" Text='<%# Bind("topicname") %>'></asp:LinkButton>
                                    </td>
                                </tr>
                            </ItemTemplate>
                            <FooterTemplate>
                                </table>
                            </FooterTemplate>
                        </asp:Repeater>
                    </td>
                </tr>
                <tr>
                    <td class="bodytxt">
                        <strong>Post Blog</strong></td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label></td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                </tr>
                <tr style="height: 25px;">
                    <td>Blog Title:</td>
                </tr>
                <tr>
                    <td>
                        <asp:TextBox runat="server" ID="txtBlogTitle" CssClass="generaltext1" MaxLength="100"
                            Width="98%" ToolTip="Enter blog title"></asp:TextBox></td>
                </tr>
                <tr style="height: 25px;">
                    <td>
                        <b>Post Description:</b></td>
                </tr>
                <tr>
                    <td style="border-bottom: 1px solid #eaeaea; padding: 10px 0; height: 20px;">
                        <Editor:BlogEditor ID="txtDescription" Height="80" Width="400" runat="server" IsHtmlEncodeDecode="true" />
                        <asp:TextBox ID="txtDescription1" runat="Server" TextMode="multiline" CssClass="generaltext1" Width="98%" Visible="false"
                            Style="height: 80px;" /></td>
                </tr>
                <tr>
                    <td style="border-bottom: 1px solid #eaeaea; padding: 10px 0; height: 20px;">
                        <asp:Button ID="btnSubmit" runat="server" CssClass="buttonclass" Text="Post Message"
                            OnClick="btnSubmit_Click1" OnClientClick="updateRTE('txtDescription');" />
                        <asp:Button ID="btnDeleteBlog" runat="server" CssClass="buttonclass" Text="Delete Blog"
                            OnClick="DeleteBlog" />
                        <%--                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtDescription"
                                                        Display="Dynamic" ErrorMessage="Message Box is Empty."></asp:RequiredFieldValidator>--%>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtBlogTitle"
                            Display="Dynamic" ErrorMessage="Blog Title is Empty."></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        <p>
                            Note: Your posting can be viewed by anyone. | <a href="#">Posting guidelines </a>
                        </p>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</asp:Content>
